package br.ufc.ck0017.semantic.model;

public class SemanticMainClass {
    private final String name;
    private SemanticMainMethod semanticMainMethod;

    public SemanticMainClass(String name) {
        this.name = name;
    }

    public SemanticMainMethod getSemanticMainMethod() {
        return semanticMainMethod;
    }

    public void setSemanticMainMethod(SemanticMainMethod semanticMainMethod) throws IllegalArgumentException {
        if (this.semanticMainMethod != null) {
            throw new IllegalArgumentException();
        }

        this.semanticMainMethod = semanticMainMethod;
    }

    @Override
    public String toString() {
        return "SemanticMainClass{" +
                "name='" + name + '\'' +
                ", semanticMainMethod=" + semanticMainMethod +
                '}';
    }
}
